package shape;

import java.awt.Graphics;

import net.jcip.annotations.Immutable;

@Immutable
public class Square implements Shape {

	private final int x;
	private final int y;
	private final int size;

	public Square() {
		x = 50;
		y = 50;
		size = 100;
	}
	
	public Square(int x, int y, int size) {
		this.x = x;
		this.y = y;
		this.size = size;
	}
	
	@Override
	public void draw() {
		System.out.println("Square");
	}
	
	@Override
	public void paintShape(Graphics g) {
		g.drawRect(x, y, size, size);
	}
	
	@Override
	public void fillShape(Graphics g) {
		g.fillRect(x, y, size, size);
	}

	@Override
	public int getX() {
		return x;
	}

	@Override
	public int getY() {
		return y;
	}

	@Override
	public int getSize() {
		return size;
	}
}
